//
// Copyright (c) 2011 Alex Nesterenko
//

#ifndef NANE_POSIXWRITEFILE__H
#   define  NANE_POSIXWRITEFILE__H

#   include "nane/core/crt/POSIX/POSIXFileBase_.h"

namespace nane
{
    class POSIXWriteFile
        : public POSIXFileBase
        , public SubSystemProduct<FileSystem::Implementation, POSIXWriteFile, IWriteFile>
    {
    public:
        POSIXWriteFile( FileSystem::Implementation* _creator, int _interface, const char* _filename );
        ~POSIXWriteFile();
        
    public:
        void seek( uint32 _pos )
        {
            POSIXFileBase::seek(_pos);
        }
        
        uint32 tell()
        {
            return POSIXFileBase::tell();
        }
        
        uint32 size() const
        {
            return POSIXFileBase::size();
        }
        
        bool flush();
        uint32 write( const byte* _data, uint32 _count );
        
    };
}   // namespace nane

#endif	// NANE_POSIXWRITEFILE__H
